package moe.oil.dto.school;

import lombok.Data;
import lombok.experimental.Accessors;
import moe.oil.enumeration.SchoolType;
import moe.oil.validation.grop.OnInsert;
import moe.oil.validation.grop.OnUpdate;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@Accessors(chain = true)
@Validated({OnInsert.class, OnUpdate.class})
public class SchoolDTO  {

    private Long schoolId;
    @NotBlank(message = "学校名称不能为空")
    private String schoolName;

    private SchoolType schoolType;

    String schoolIconUrl ;

    @NotBlank(message = "学校地址不能为空")
    String address;

    @NotNull(message = "学校经度不能为空")
    String longitude;

    @NotBlank(message = "学校纬度不能为空")
    String latitude;

    @NotBlank(message = "环境图片不能为空")
    String environmentUrl;
}
